package com.ytjj.qmyx.mall.mapper;

import com.ytjj.qmyx.mall.model.CouponRecords;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface CouponRecordsDao {

    List<CouponRecords> selectUsage(@Param("type") Integer type,
                                    @Param("token") String token,
                                    @Param("nowDate") Date nowDate,
                                    @Param("source") String source);

    CouponRecords queryOne(@Param("productId") Integer productId,
                             @Param("token") String token,
                             @Param("nowDate") Date nowDate,
                            @Param("source") String source);

    Integer selectIsReceive(@Param("productId") Integer productId,
                            @Param("token") String token,
                            @Param("nowDate") Date nowDate,
                            @Param("source") String source);
    void updateUsed(@Param("productId") Integer productId,
                    @Param("token") String token);
}
